class CartsController < ApplicationController
    include AuthenticatedSystem
  before_filter :init_cart
  def index
    @html_title = "购物车首页"
  end

  def show
    store_location
  end

  def update
    @cart.update(params[:items])
    redirect_to :action => 'show'
  end
 
  protected

  def init_cart
    @cart = (session[:cart] ||= Cart.new)
  end

end
